package svc

import (
	"mail/service/property/model"
	"mail/service/property/rpc/internal/config"

	"github.com/zeromicro/go-zero/core/stores/sqlx"
)

type ServiceContext struct {
	Config        config.Config
	PropertyModel model.PropertyModel
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:        c,
		PropertyModel: model.NewPropertyModel(sqlx.NewMysql(c.Mysql.DataSource), c.CacheRedis),
	}
}
